package com.simen.accessible;

import android.app.Activity;
import android.graphics.Rect;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

public class MainActivity extends Activity {

    private static final String TAG = "MainActivity";

    private TextView hello;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        hello = (TextView) findViewById(R.id.hello);

        hello.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                int linecount = hello.getLineCount();
                int LineHeight = hello.getLineHeight();
                Rect rect = new Rect();
                int ybaseline = hello.getLineBounds(1, rect);
                Log.d(TAG, "onClick: " + linecount + " " + LineHeight + " " + ybaseline + " " + rect.toString());

            }
        });

    }
}
